#!/bin/sh

#*************************************************************************
#
# ADOBE CONFIDENTIAL
# ___________________
#
#  Copyright 2010 Adobe Systems Incorporated
#  All Rights Reserved.
#
# NOTICE:  All information contained herein is, and remains
# the property of Adobe Systems Incorporated and its suppliers,
# if any.  The intellectual and technical concepts contained
# herein are proprietary to Adobe Systems Incorporated and its
# suppliers and are protected by trade secret or copyright law.
# Dissemination of this information or reproduction of this material
# is strictly forbidden unless prior written permission is obtained
# from Adobe Systems Incorporated.
#*************************************************************************

if [ -f "/System/Library/CoreServices/SystemVersion.plist" ]
then
	OS_VERSION=`/usr/bin/defaults read /System/Library/CoreServices/SystemVersion ProductVersion`

else 
	if [ -f "/System/Library/CoreServices/ServerVersion.plist" ]
	then
		OS_VERSION=`/usr/bin/defaults read /System/Library/CoreServices/ServerVersion ProductVersion`
	else
		#err will be of the type "An error was encountered while running the InstallationCheck tool for package <package_name>."
		exit 100
	fi
fi

OS_MAJOR_VERSION=`echo $OS_VERSION | cut -f1 -d'.'`
OS_MINOR_VERSION=`echo $OS_VERSION | cut -f2 -d'.'`
OS_PATCH_VERSION=`echo $OS_VERSION | cut -f3 -d'.'`

if [ "$OS_MAJOR_VERSION" -lt "10" ] || [[ "$OS_MAJOR_VERSION" -eq "10" && "$OS_MINOR_VERSION" -lt "6" ]] || [[ "$OS_MAJOR_VERSION" -eq "10" && "$OS_MINOR_VERSION" -eq "6" && "$OS_PATCH_VERSION" -lt "8" ]]
then
	#err will be of the type "The software <package_name> cannot be installed on this computer"
	exit 97
fi


SYS_TYPE=`sysctl -n hw.cputype`
if [ "$SYS_TYPE" -ne "7" ] && [ "$SYS_TYPE" -ne "71" ]
then
	#err will be of the type "The software <package_name> cannot be installed on this computer"
	exit 97
fi

exit 0
